import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
    {
        path: '/',
        name: 'Login',
        component: () => import("../views/Login.vue")
    },
    {
        path: '/UserCenter',
        name: 'usercenter',
        component: () => import("../views/UserCenter.vue"),
        redirect: '/UserCenter/UserInfo',

        children: [
            {
                path: "UserInfo",
                name: "UserInfo",
                component: () => import("../views/UserInfo.vue"),
            },
            {
                path: "UserSettings",
                name: "UserSettings",
                component: () => import("../views/UserSettings.vue"),
            },
        ],
    },

]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router